package we3d.primitives 
{
	import we3d.core.Camera3d;
	import we3d.math.Matrix3d;
	import we3d.scene.SceneObject;
	
	public class BasePrimitive extends SceneObject 
	{
		public function BasePrimitive () {}
		
		/**
		* @private
		*/
		protected var recreate:Boolean=true;
		/**
		* @private
		*/
		public function invalidate () :void {
			recreate = true;
		}
		/**
		* @private
		*/
		public override function initFrame(f:Number, c:Camera3d, cam_cgv:Matrix3d) :Boolean {
			if(recreate) {
				recreate = false;
				updateGeometry();
			}
			
			return super.initFrame(f,c,cam_cgv);
		}
		/**
		* @private
		*/
		public function updateGeometry () :void {}
	}
	
}